package ua.bocha.annotation.validation.impl;

import ua.bocha.annotation.validation.ValidateParameter;
import ua.bocha.annotation.validation.ValidateType;
import ua.bocha.annotation.validation.Validators;

import java.math.BigDecimal;
import java.util.Date;

/**
 * DateEqual: 08.08.12
 *
 * @author bocha
 */
public interface IProduct {

    @Validators({
            @ValidateParameter(source = "id2", validateType = {ValidateType.DEFAULT})
    })
    void setId2(Integer id2);

    Integer getId2();

    @ValidateParameter(source = "name", validateType = {ValidateType.EMPTY})
    void setName(String name);

    @ValidateParameter(source = "name", validateType = {ValidateType.EMPTY})
    String getName();

    @ValidateParameter(source = "price", validateType = {ValidateType.DEFAULT, ValidateType.IS_NULL})
    void setPrice(BigDecimal price);

    BigDecimal getPrice();

    @ValidateParameter(source = "datePrice", validateType = {ValidateType.DEFAULT, ValidateType.IS_NULL})
    void setDatePrice(Date datePrice);

    Date getDatePrice();

}
